Development: Port new gender contracts - #2638
Conversation
…computed re-runs on every title change
…or-not-shown' into bugfix/2321-title-compliance-error-not-shown
…or-not-shown' into bugfix/2321-title-compliance-error-not-shown
…egories-in-sidebar' into feat/2345-add-new-compliance-categories-in-sidebar
fix namings
…egories-in-sidebar' into feat/2345-add-new-compliance-categories-in-sidebar
Not up to standards ⛔🔴 Issues
|
| Category | Results |
|---|---|
| ErrorProne | 1 medium |
| CodeStyle | 3 minor |
🟢 Metrics 21 complexity
Metric Results Complexity 21
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
- replace the removed gender-bias analysis response with BiasedIssueDTO arrays - derive inclusive, non-inclusive, and neutral states from biased issue types - update the editor highlights, analysis dialog, assistant card, and review count - source gender findings and loading state from the existing job analysis workflow - remove client-side gender-bias analysis service and test mock - update affected component and utility tests for the new contracts
Development: Port new gender contracts
|
📊 Client Test Coverage Too Low 🔍 View coverage locally: pnpm run test:ci
open build/test-results/vitest/coverage/index.html🌐 View coverage from GitHub: |
|
🤖 No OpenAPI or client changes needed. |
|
🤖 No OpenAPI or client changes needed. |
…nder-contracts # Conflicts: # src/main/resources/config/liquibase/master.xml # src/main/webapp/app/job/job-creation-form/job-creation-form.component.html # src/main/webapp/app/job/job-creation-form/job-creation-form.component.ts # src/main/webapp/app/shared/components/atoms/editor/editor.component.ts # src/main/webapp/app/shared/components/molecules/ai-assistant-card/ai-assistant-card.component.ts # src/main/webapp/app/shared/gender-bias-analysis/gender-bias-analysis.utils.ts # src/test/webapp/app/shared/components/atoms/editor/editor.component.spec.ts
- add Unicode-aware word-boundary detection to the gender-bias analysis utility - update EditorComponent to skip gender findings inside longer words - test that Führung is not highlighted inside Personalführung - test that lead is not highlighted inside misleading
az108
left a comment
There was a problem hiding this comment.
This is in good shape — merges cleanly (git merge-tree origin/main HEAD exits 0, zero conflicts), which is worth calling out given the branch it replaces does not. One deletable file, inline.
Checks that passed
| Check | Result |
|---|---|
Merge into main |
clean, 0 conflicts |
| Word-boundary fix carried over from #2630 | isWordChar in the shared utils, applied at editor.component.ts:453 |
| Empty-token guard | present on both loops (compliance and gender) |
| Boundary guard scoped correctly | gender loop only — right call, compliance snippets are multi-word phrases where it would be wrong |
| i18n parity | 364/364 keys, genderDecoder complete in EN and DE |
| Test naming | all new it(...) start with should |
| New spec | gender-bias-analysis.utils.spec.ts covers trim/dedup/type-filter plus undefined and empty input |
The isWordChar JSDoc is the good kind — it records why \p{L} rather than \w (umlauts, ß) and why the hyphen is excluded (mirrors deHyphenNonCodedWords server-side). That reasoning is not recoverable from the code alone, so thanks for writing it down.
One thing that improved in the port: isGenderAnalyzing is now bound as [isGenderAnalyzing]="isAnalyzing()", a plain signal, rather than the genderBiasService.isAnalyzing(...) service-method call the previous branch had in the template.
I deliberately did not flag the raw 'NON_INCLUSIVE' literal in getUniqueNonInclusiveWords — it matches computeCodingStatus in the same file, and type is a narrow 'NON_INCLUSIVE' | 'INCLUSIVE' union, so a typo would fail to compile.
Context
I have closed #2630 in favour of this PR. 11 of the 12 files here overlap with it, that branch could no longer merge after #2465 removed the API it was built on, and everything raised in review there was resolved before closing — the fixes carry forward in this branch.
…nder-contracts # Conflicts: # src/main/webapp/app/shared/components/atoms/editor/editor.component.ts
Checklist
General
Client
Motivation and Context
This PR ports the Gender Decoder integration to the new BiasedIssue / JobAnalysisDTO contracts ahead of the dependent PRs being merged, so the required compatibility changes are already prepared and don’t block on merge order.
Fixes: #2637 resulting from #2630 and #2465 will collide head-on.
Description
The editor no longer subscribes to
GenderBiasAnalysisService.getAnalysisForField(). It receives findings through a newbiasedAnalysisinput instead, so the removed endpoint is no longer referenced from the atom.toObservable,fieldIdChanges$and the service injection are gone;genderBiasHighlightsnow derives from the input.Contract migration
GenderBiasAnalysisResponse/BiasedWordDTO→BiasedIssueDTOcodingstring values ('non-inclusive-coded','inclusive-coded') →computeCodingStatus()returning'NON_INCLUSIVE'/'INCLUSIVE'/'NEUTRAL'type: 'non-inclusive'→BiasedIssueDTOTypeEnum.NON_INCLUSIVEComplianceIssue→ComplianceIssueDTOin the assistant card and filter typesPrerequisites:
Review Progress
Code Review
Manual Tests
Screenshots
Test Coverage
Client
Last updated: 2026-08-27 16:09:35 UTC